/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package classes;

import java.util.ArrayList;
import java.util.List;


public class Imagen {
    private Integer IdImagen;
    private Integer idRiesgo;
    private String path;
    private List <Obstaculo> listaObstaculos;

    public Imagen() {
    }

    public Imagen(Integer IdImagen, Integer idRiesgo, String path, List<Obstaculo> listaObstaculos) {
        this.IdImagen = IdImagen;
        this.idRiesgo = idRiesgo;
        this.path = path;
        this.listaObstaculos = listaObstaculos;
    }

    @Override
    public String toString() {
        return "Imagen("+getPath()+","+getIdImagen()+","+getIdRiesgo()+")";
    }

    public Integer getIdImagen() {
        return IdImagen;
    }

    public void setIdImagen(Integer IdImagen) {
        this.IdImagen = IdImagen;
    }

    public Integer getIdRiesgo() {
        return idRiesgo;
    }

    public void setIdRiesgo(Integer idRiesgo) {
        this.idRiesgo = idRiesgo;
    }

    public String getPath() {
        return path;
    }

    public void setPath(String path) {
        this.path = path;
    }

    public List<Obstaculo> getListaObstaculos() {
        return listaObstaculos;
    }

    public void setListaObstaculos(List<Obstaculo> listaObstaculos) {
        this.listaObstaculos = listaObstaculos;
    }
    public void addObstaculo(Obstaculo obstaculo){
        if(this.listaObstaculos == null){
            listaObstaculos = new ArrayList<>();
        }
        listaObstaculos.add(obstaculo);
    }


}
